/*
 * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @Date: 2024-06-20 09:51:29
 * @LastEditors: 别拿暗恋当饭吃. 13466071+lililkli@user.noreply.gitee.com
 * @LastEditTime: 2024-06-27 18:32:17
 * @FilePath: \react项目框架\sx_demo2\config\webpack.dev.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
const config = require("./webpack.config");
const proxy = require("./stepProxy");
module.exports = {
  ...config,
  mode: "development",
  entry: {
    hot: "webpack/hot/dev-server.js",
    client: "webpack-dev-server/client/index.js?hot=true&live-reload=true",
    main: config.entry,
  },
  devtool: "eval-cheap-module-source-map",
  devServer: {
    port: 8888,
    compress: true,
    historyApiFallback: true,
    client: {
      overlay: false,
    },

    proxy: [
      {
        context: ["/api/user"],
        target: "http://wq.bwstudent.com:7999/health/user/v1/",
        pathRewrite: { "^/api/user": "" },
      },
      {
        context: ["/api/knowledgeBase"],
        target: "http://wq.bwstudent.com:7999/health/share/knowledgeBase/v1/",
        pathRewrite: { "^/api/knowledgeBase": "" },
      },
      {
        context: ["/api/verify"],
        target: "http://wq.bwstudent.com:7999/health/user/verify/v1/",
        pathRewrite: { "^/api/verify": "" },
      },
    ],
    proxy,
  },
};
//http://172.17.8.100/health/user/verify/v1/addSign
// wq.bwstudent.com:7999
//http://172.17.8.100/health/user/verify/v1/doTask
